import {post,get} from "../utils/request";
/**
 * 封装list请求;
 * @param {*} url 
 * @param {*} request 
 */
export function postList(url,request){
    return post(url,request).then((result = {})=>{
        let data = result.data || {};
        let rows = data.rows || [];
        let obj = {
            rows,
            total:data.total || 0,
            totalPage:Math.ceil(Number(data.total)/Number(request.pageSize))
        }
        return obj;
    })
}